<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>静态定位与相对定位</title>
    <style>
        div{
            width: 200px;
            height: 200px;
        }
        .box1{
            background: red;
        }
        .box2{
            background: blue;
            position: relative;
            top: -100px;
            left: -100px;
            right: 100px;
            /* 相对定位是相对于自己位置的 不要同时设置上下或者左右 */
            /* top: 100px; */
        }
        .box3{
            background: yellow;
        }
    </style>
</head>
<body>
    <div>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Officia sapiente sed veniam unde delectus quae quam nihil incidunt quibusdam, deserunt, expedita ea inventore corrupti hic nisi aspernatur? Voluptatibus, dolore modi!</div>
    <!-- 相对位置不脱离文档流 -->
    <div class="box1">Lorem ipsum dolor sit amet consectetur adipisicing elit. Accusamus eius consequuntur neque impedit esse. Vel consequatur officia, molestiae beatae qui unde, eum eos cupiditate omnis iure magni porro dicta velit.</div>
    <div class="box2"></div>
    <div class="box3"></div>
</body>
</html>